package com.tengju.bff.interfaces.covercharge.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tengju.bff.interfaces.covercharge.dto.ServiceManageDetailDTO;
import com.tengju.bff.interfaces.covercharge.entity.po.ServiceManageDetail;
import com.tengju.bff.interfaces.covercharge.entity.vo.AdminServiceManageQueryVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zhaoyi
 * @since 2020-02-24
 */
@Component
public interface ServiceManageDetailMapper extends BaseMapper<ServiceManageDetail> {

    List<AdminServiceManageQueryVo> queryPageByIdCode(Page pagination, @Param("codeId") String codeId,
                                                      @Param("startDate") String startDate,
                                                      @Param("endDate") String endDate,
                                                      @Param("orderId") String orderId,
                                                      @Param("otherId") String otherId,
                                                      @Param("des") String des, @Param("profitType") String profitType);

    List<ServiceManageDetailDTO> getListFromIdCodeAndTableIdList(@Param("idCode") Integer idCode,
                                                                 @Param("tableIdList") List<Integer> tableIdList,
                                                                 @Param("orderId") Long orderId,
                                                                 @Param("profitType") Integer profitType);

    List<ServiceManageDetailDTO> getManageDetailList(@Param("idCode") Integer idCode,
                                                     @Param("tableIds") List<Integer> tableIds,
                                                     @Param("orderId") Long orderId,
                                                     @Param("des") String des, @Param("profitType") Integer profitType,
                                                     @Param("startDate") String startDate, @Param("endDate") String endDate);
}
